home *** CD-ROM | disk | FTP | other *** search
- /* %filename% -- Modal one-shot dialog */
- /* Created %date% %time% by AppMaker */
-
- #include "ResourceDefs.h"
- #include "DialogAids.h"
-
- #include "%unitname%.h"
-
- #define NULL 0L
-
- %for each item gen itemNr%
-
- %for each item gen auxiliary%
- %if needsFilter%
- /*----------*/
- static pascal Boolean Filter%dlogname% (DialogPtr whichDialog,
- EventRecord *event,
- short *itemHit);
- pascal Boolean Filter%dlogname% (whichDialog, event, itemHit)
- DialogPtr whichDialog;
- EventRecord *event;
- short *itemHit;
- {
- Boolean filtered;
-
- filtered = false;
- %for each item gen filter%
- if (!filtered) {
- filtered = StandardFilter (whichDialog, event, itemHit);
- }
- return (filtered);
- } /*Filter%dlogname%*/
-
- %end if%
- /*----------*/
- void Get%dlogname% (%dlogname%)
- %dlogname%Rec% %*%dlogname%;
- {
- DialogPtr theDialog;
- short itemNr;
- register %dlogname%Ptr info;
-
- InitCursor ();
- theDialog = GetNewDialog (%dlogname%ID, NULL, (WindowPtr) -1L);
- SetPort (theDialog);
- info = %dlogname%;
- %for each item gen set%
- ShowWindow (theDialog);
- %if needsFilter%
- ModalDialog (Filter%dlogname%, &itemNr);
- %else%
- ModalDialog (NULL, &itemNr);
- %end if%
- switch (itemNr) {
- %for each item gen hit%
- } /*case*/
- %for each item gen finish%
- DisposDialog (theDialog);
- } /*Get%dlogname%*/
-
- /* %filename% */
-